/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.DBLink;
import io.sirius.ms.sdk.model.SpectralLibraryMatch;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * StructureCandidate
 */
@JsonPropertyOrder({
  StructureCandidate.JSON_PROPERTY_INCHI_KEY,
  StructureCandidate.JSON_PROPERTY_SMILES,
  StructureCandidate.JSON_PROPERTY_STRUCTURE_NAME,
  StructureCandidate.JSON_PROPERTY_STRUCTURE_SVG,
  StructureCandidate.JSON_PROPERTY_DB_LINKS,
  StructureCandidate.JSON_PROPERTY_SPECTRAL_LIBRARY_MATCHES,
  StructureCandidate.JSON_PROPERTY_XLOG_P
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class StructureCandidate {
  public static final String JSON_PROPERTY_INCHI_KEY = "inchiKey";
  @jakarta.annotation.Nullable
  private String inchiKey;

  public static final String JSON_PROPERTY_SMILES = "smiles";
  @jakarta.annotation.Nullable
  private String smiles;

  public static final String JSON_PROPERTY_STRUCTURE_NAME = "structureName";
  @jakarta.annotation.Nullable
  private String structureName;

  public static final String JSON_PROPERTY_STRUCTURE_SVG = "structureSvg";
  @jakarta.annotation.Nullable
  private String structureSvg;

  public static final String JSON_PROPERTY_DB_LINKS = "dbLinks";
  @jakarta.annotation.Nullable
  private List<DBLink> dbLinks;

  public static final String JSON_PROPERTY_SPECTRAL_LIBRARY_MATCHES = "spectralLibraryMatches";
  @jakarta.annotation.Nullable
  private List<SpectralLibraryMatch> spectralLibraryMatches;

  public static final String JSON_PROPERTY_XLOG_P = "xlogP";
  @jakarta.annotation.Nullable
  private Double xlogP;

  public StructureCandidate() {
  }

  public StructureCandidate inchiKey(@jakarta.annotation.Nullable String inchiKey) {
    
    this.inchiKey = inchiKey;
    return this;
  }

  /**
   * Get inchiKey
   * @return inchiKey
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_INCHI_KEY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getInchiKey() {
    return inchiKey;
  }


  @JsonProperty(JSON_PROPERTY_INCHI_KEY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setInchiKey(@jakarta.annotation.Nullable String inchiKey) {
    this.inchiKey = inchiKey;
  }

  public StructureCandidate smiles(@jakarta.annotation.Nullable String smiles) {
    
    this.smiles = smiles;
    return this;
  }

  /**
   * Get smiles
   * @return smiles
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SMILES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSmiles() {
    return smiles;
  }


  @JsonProperty(JSON_PROPERTY_SMILES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSmiles(@jakarta.annotation.Nullable String smiles) {
    this.smiles = smiles;
  }

  public StructureCandidate structureName(@jakarta.annotation.Nullable String structureName) {
    
    this.structureName = structureName;
    return this;
  }

  /**
   * Get structureName
   * @return structureName
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_STRUCTURE_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getStructureName() {
    return structureName;
  }


  @JsonProperty(JSON_PROPERTY_STRUCTURE_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStructureName(@jakarta.annotation.Nullable String structureName) {
    this.structureName = structureName;
  }

  public StructureCandidate structureSvg(@jakarta.annotation.Nullable String structureSvg) {
    
    this.structureSvg = structureSvg;
    return this;
  }

  /**
   * SVG graphics of the structure candidate  OPTIONAL: needs to be added by parameter
   * @return structureSvg
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_STRUCTURE_SVG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getStructureSvg() {
    return structureSvg;
  }


  @JsonProperty(JSON_PROPERTY_STRUCTURE_SVG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStructureSvg(@jakarta.annotation.Nullable String structureSvg) {
    this.structureSvg = structureSvg;
  }

  public StructureCandidate dbLinks(@jakarta.annotation.Nullable List<DBLink> dbLinks) {
    
    this.dbLinks = dbLinks;
    return this;
  }

  public StructureCandidate addDbLinksItem(DBLink dbLinksItem) {
    if (this.dbLinks == null) {
      this.dbLinks = new ArrayList<>();
    }
    this.dbLinks.add(dbLinksItem);
    return this;
  }

  /**
   * List of structure database links belonging to this structure candidate  OPTIONAL: needs to be added by parameter
   * @return dbLinks
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DB_LINKS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<DBLink> getDbLinks() {
    return dbLinks;
  }


  @JsonProperty(JSON_PROPERTY_DB_LINKS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDbLinks(@jakarta.annotation.Nullable List<DBLink> dbLinks) {
    this.dbLinks = dbLinks;
  }

  public StructureCandidate spectralLibraryMatches(@jakarta.annotation.Nullable List<SpectralLibraryMatch> spectralLibraryMatches) {
    
    this.spectralLibraryMatches = spectralLibraryMatches;
    return this;
  }

  public StructureCandidate addSpectralLibraryMatchesItem(SpectralLibraryMatch spectralLibraryMatchesItem) {
    if (this.spectralLibraryMatches == null) {
      this.spectralLibraryMatches = new ArrayList<>();
    }
    this.spectralLibraryMatches.add(spectralLibraryMatchesItem);
    return this;
  }

  /**
   * List of spectral library matches belonging to this structure candidate  OPTIONAL: needs to be added by parameter
   * @return spectralLibraryMatches
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SPECTRAL_LIBRARY_MATCHES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<SpectralLibraryMatch> getSpectralLibraryMatches() {
    return spectralLibraryMatches;
  }


  @JsonProperty(JSON_PROPERTY_SPECTRAL_LIBRARY_MATCHES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSpectralLibraryMatches(@jakarta.annotation.Nullable List<SpectralLibraryMatch> spectralLibraryMatches) {
    this.spectralLibraryMatches = spectralLibraryMatches;
  }

  public StructureCandidate xlogP(@jakarta.annotation.Nullable Double xlogP) {
    
    this.xlogP = xlogP;
    return this;
  }

  /**
   * Get xlogP
   * @return xlogP
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_XLOG_P)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getXlogP() {
    return xlogP;
  }


  @JsonProperty(JSON_PROPERTY_XLOG_P)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setXlogP(@jakarta.annotation.Nullable Double xlogP) {
    this.xlogP = xlogP;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StructureCandidate structureCandidate = (StructureCandidate) o;
    return Objects.equals(this.inchiKey, structureCandidate.inchiKey) &&
        Objects.equals(this.smiles, structureCandidate.smiles) &&
        Objects.equals(this.structureName, structureCandidate.structureName) &&
        Objects.equals(this.structureSvg, structureCandidate.structureSvg) &&
        Objects.equals(this.dbLinks, structureCandidate.dbLinks) &&
        Objects.equals(this.spectralLibraryMatches, structureCandidate.spectralLibraryMatches) &&
        Objects.equals(this.xlogP, structureCandidate.xlogP);
  }

  @Override
  public int hashCode() {
    return Objects.hash(inchiKey, smiles, structureName, structureSvg, dbLinks, spectralLibraryMatches, xlogP);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StructureCandidate {\n");
    sb.append("    inchiKey: ").append(toIndentedString(inchiKey)).append("\n");
    sb.append("    smiles: ").append(toIndentedString(smiles)).append("\n");
    sb.append("    structureName: ").append(toIndentedString(structureName)).append("\n");
    sb.append("    structureSvg: ").append(toIndentedString(structureSvg)).append("\n");
    sb.append("    dbLinks: ").append(toIndentedString(dbLinks)).append("\n");
    sb.append("    spectralLibraryMatches: ").append(toIndentedString(spectralLibraryMatches)).append("\n");
    sb.append("    xlogP: ").append(toIndentedString(xlogP)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

